package com.it.xiaotao.lock;

public class User {
    public void eat() {
        synchronized (User.class) {
            System.out.println("吃饭");
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
